const express = require('express');
const router = express.Router();
const reportController = require('../controllers/reportController');
const { authUser } = require('../middleware/auth');

router.use(authUser);

// 举报资源集合
router.get('/', reportController.getReportList);           // 获取举报列表
router.post('/', reportController.submitReport);           // 提交举报

// 单个举报资源
router.get('/:id', reportController.getReportDetail);      // 获取举报详情
router.delete('/:id', reportController.deleteReport);      // 删除举报

// 举报处理子资源
router.put('/:id/handle', reportController.handleReport);  // 处理举报
router.put('/:id/reject', reportController.rejectReport);  // 驳回举报




module.exports = router; 